package com.ruoyi.shop.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.ShopUserAddressesMapper;
import com.ruoyi.shop.domain.ShopUserAddresses;
import com.ruoyi.shop.service.IShopUserAddressesService;

/**
 * 用户收货地址Service业务层处理
 * 
 * @author liuwp
 * @date 2025-11-24
 */
@Service
public class ShopUserAddressesServiceImpl implements IShopUserAddressesService 
{
    @Autowired
    private ShopUserAddressesMapper shopUserAddressesMapper;

    /**
     * 查询用户收货地址
     * 
     * @param id 用户收货地址主键
     * @return 用户收货地址
     */
    @Override
    public ShopUserAddresses selectShopUserAddressesById(Long id)
    {
        return shopUserAddressesMapper.selectShopUserAddressesById(id);
    }

    /**
     * 查询用户收货地址列表
     * 
     * @param shopUserAddresses 用户收货地址
     * @return 用户收货地址
     */
    @Override
    public List<ShopUserAddresses> selectShopUserAddressesList(ShopUserAddresses shopUserAddresses)
    {
        return shopUserAddressesMapper.selectShopUserAddressesList(shopUserAddresses);
    }

    /**
     * 根据业务主键查询一条记录：用户收货地址
     *
     * @param shopUserAddresses 用户收货地址
     * @return 用户收货地址
     */
    @Override
    public ShopUserAddresses selectOneShopUserAddresses(ShopUserAddresses shopUserAddresses)
    {
        return shopUserAddressesMapper.selectOneShopUserAddresses(shopUserAddresses);
    }

    /**
     * 新增用户收货地址
     * 
     * @param shopUserAddresses 用户收货地址
     * @return 结果
     */
    @Override
    public int insertShopUserAddresses(ShopUserAddresses shopUserAddresses)
    {
        return shopUserAddressesMapper.insertShopUserAddresses(shopUserAddresses);
    }

    /**
     * 修改用户收货地址
     * 
     * @param shopUserAddresses 用户收货地址
     * @return 结果
     */
    @Override
    public int updateShopUserAddresses(ShopUserAddresses shopUserAddresses)
    {
        return shopUserAddressesMapper.updateShopUserAddresses(shopUserAddresses);
    }

    @Override
    public int updateShopUserAddressesCondition(ShopUserAddresses shopUserAddresses, ShopUserAddresses shopUserAddressesCondition)
    {
        return shopUserAddressesMapper.updateShopUserAddressesCondition(shopUserAddresses, shopUserAddressesCondition);
    }

    /**
     * 批量删除用户收货地址
     * 
     * @param ids 需要删除的用户收货地址主键
     * @return 结果
     */
    @Override
    public int deleteShopUserAddressesByIds(Long[] ids)
    {
        return shopUserAddressesMapper.deleteShopUserAddressesByIds(ids);
    }

    /**
     * 删除用户收货地址信息
     * 
     * @param id 用户收货地址主键
     * @return 结果
     */
    @Override
    public int deleteShopUserAddressesById(Long id)
    {
        return shopUserAddressesMapper.deleteShopUserAddressesById(id);
    }

    /**
     * 条件删除用户收货地址
     *
     * @param shopUserAddresses 用户收货地址
     * @return 结果
     */
    @Override
    public int deleteShopUserAddressesByCondition(ShopUserAddresses shopUserAddresses)
    {
        return shopUserAddressesMapper.deleteShopUserAddressesByCondition(shopUserAddresses);
    }

}
